﻿@page "/setting"



<h1>Counter</h1>

<p>Current count: @currentCount</p>
<p>json: @json</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

@code {
    [Inject] private HttpClient Http { get; set; }
    [Inject] private BookService bookService { get; set; }

    private int currentCount = 0;
    private string json = "";
    private async void IncrementCount()
    {
        currentCount++;
        var book = await bookService.InsertAsync(currentCount);
        json = JsonSerializer.Serialize(book, new JsonSerializerOptions());

        var aa = new SimpleCrawler()
             .CallOnCompleted((s, e) =>
            {

            });

           await aa.SetUrl("").ToWorkerAsync();

        var Crawler = await "".CreateCrawler(new SimpleCrawler())
        .CallOnCompleted((s, e) =>
        {

        })
        .SetMethod("Post")
        .ToWorkerAsync();

       await Crawler.SetUrl("").ToWorkerAsync();


      

    }
}